/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package coalescent.nb.jobs2;

import cef.command.Command;
import cef.pui.EventConstructionException;
import coalescent.cef.command.DrawGeneTree_Cmd;
import coalescent.cef.command.listener.VisualizeGeneTree_OC;
import coalescent.cef.pui.DrawGeneTree_EvtImpl;
import coalescent.nb.jobs.properties.Propertys_Coa;
import commons.nb.jobs.Job;
import commons.nb.jobs.gui.JobsGUIUtil;

/**
 * @author Susanta Tewari
 * @since Jun 4, 2011
 */
public class DrawGeneTree_Job extends Job<DrawGeneTree_EvtImpl> {

    public DrawGeneTree_Job() {

        setName("Visualize Gene Tree");
        setDisplayName("Visualize Gene Tree");
        setShortDescription("Visualize Gene Tree");
        addComboProperty(Propertys_Coa.of_Builder_K69Data(null));


        // listeners
        addCommandOutputListener(JobsGUIUtil.makeEmbeddable(new VisualizeGeneTree_OC()));
    }

    @Override
    protected boolean needsOutputWindow() {
        return false;
    }

    @Override
    protected DrawGeneTree_EvtImpl createEvent() throws EventConstructionException {
        return new DrawGeneTree_EvtImpl(getProperties());
    }

    @Override
    public Class<DrawGeneTree_EvtImpl> getEventImplType() {
        return DrawGeneTree_EvtImpl.class;
    }

    @Override
    protected Command createCommand(final DrawGeneTree_EvtImpl event) {
        return new DrawGeneTree_Cmd(event);
    }    // </editor-fold>
}
